<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../lib/innerIframe-include-ext.js"></script>
<script type="text/javascript" src="../../lib/loader-theme.js"></script>
<script type="text/javascript" src="../../lib/ext/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../lib/ext/plugins/DataTip.js"></script>
<script type="text/javascript" src="../../lib/commonUtil.js"></script>
<title>教师管理</title>
</head>
<body>
<script type="text/javascript">
Ext.Loader.setConfig({
    enabled: true
});
Ext.require([
    '*'
]);
var parentId = 0;
Ext.onReady(function () {
	Ext.QuickTips.init();

	//创建资源树
	var tree = Ext.create('Ext.tree.Panel', {
        autoWidth:true,
        autoHeight:true,
        rootVisible: true,
        /*listeners:{
        	'itemclick':function(view, record, item, index, e, eOpts){
        		parentId = record.get('id');
        		store.loadPage(1,{params:{parentId:parentId}});
        	}
        },*/
        root:{
        	text: '教师管理',
        	expanded: true,
        	children: [
        		{
        			text: '学生分组管理',
        			hrefTarget: '/teacher/stu_group/index.html',
        			leaf: true
        		},{
        			text: '院系分组管理',
        			hrefTarget: '/teacher/dept_group/index.html',
        			leaf: true
        		}
        	]
        }
    });

    //创建全景视图端
    var viewport = Ext.create('Ext.Viewport', {
    	renderTo: Ext.getBody(),
    	width: '100%',
    	height: '90%',
    	title: '',
    	layout: 'border',
    	resizable: true,
        id: 'border-example',
        layout: 'border',//框式布局
        items: [
             {
             	xtype: 'panel',
                region: 'west',
                stateId: 'navigation-panel',
                id: 'west-panel',
                border:false,
                title: '树结构',
                split: true,
                width: 250,
                collapsible: true,
                margins: '0 0 0 5',
                layout: 'fit',
                items: tree
            },{
            	xtype: 'tabpanel',
            	id: 'home-tab-panel',
            	region: 'center'
            }
        ]
    });

    //点击事件
    tree.on('itemclick', function(treeview, record, item, index, e, opts) {
        Ext.MessageBox.alert('hello');
    });
});
</script>
</body>
</html>